{if $show_survey && $opts}
<div id="poll" class="br5">
    <div id="poll_header">Thăm dò ý kiến</div>	
    <div id="poll_q">{$question}</div>
    <div id="poll_o">
        {foreach from=$opts item=item}
        	<div class="mb5">
            	<div class="fl">{$item.control}</div> <label for="survey_id_{$item.id}" class="fl">{$item.option} {$item.option} {$item.option}</label><div class="c"></div>
            </div>
        {/foreach}	   				   
    </div>	
    <div id="poll_a">
        <a {$onclick_rate} style="float:left;display:block;margin-top:1px;line-height:normal;height:auto;text-align:center" id="btn">Biểu quyết</a>
        <a {$onclick_view} style="float:right;display:block;margin-top:1px;line-height:normal;height:auto;text-align:center" id="btn">Kết quả</a>
        <div class="c"></div>
    </div>	
</div>	
{literal}
<script>
function survey_list(item_name)
{
	var arr = document.getElementsByName(item_name);
	if (arr.length)
	{
		st='';
		for (i=0;i<arr.length;i++)
		{
			if(arr[i].checked)
			{
				if(st!='')
				{
					st+=',';
				}
				st+=arr[i].value;
			}
		}
		return st;
	}
	else
	{
		if(arr.checked)
		{
			return arr.value;
		}
	}
	return '';
}
</script>
{/literal}
{/if}
{if $is_admin}
	{if $edit}<span style="margin-right:10px">{$edit}</span>{/if} {if $delete}<span style="margin-right:15px">{$delete}</span>{/if} {$admin}
{/if}